package com.yellowpage.wf.data;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * NodeContextInstance entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_NODE_CONTEXT_INSTANCE")
public class NodeContextInstance implements java.io.Serializable {

	// Fields

	private Long nodeContextInstanceId;
	private Long nodeContextId;
	private String paramValue;
	private Long workflowNodeInstanceId;
	private Long workHistoryId;
	private Long version;
	private Long createUser;
	private Date createTime;

	// Constructors

	/** default constructor */
	public NodeContextInstance() {
	}

	/** full constructor */
	public NodeContextInstance(Long nodeContextId, String paramValue,
			Long workflowNodeInstanceId, Long workHistoryId, Long version, Long createUser, Date createTime) {
		this.nodeContextId = nodeContextId;
		this.paramValue = paramValue;
		this.workflowNodeInstanceId = workflowNodeInstanceId;
		this.workHistoryId = workHistoryId;
		this.version = version;
		this.createUser = createUser;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "NODE_CONTEXT_INSTANCE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getNodeContextInstanceId() {
		return this.nodeContextInstanceId;
	}

	public void setNodeContextInstanceId(Long nodeContextInstanceId) {
		this.nodeContextInstanceId = nodeContextInstanceId;
	}

	@Column(name = "NODE_CONTEXT_ID", precision = 18, scale = 0)
	public Long getNodeContextId() {
		return this.nodeContextId;
	}

	public void setNodeContextId(Long nodeContextId) {
		this.nodeContextId = nodeContextId;
	}

	@Column(name = "PARAM_VALUE", length = 2000)
	public String getParamValue() {
		return this.paramValue;
	}

	public void setParamValue(String paramValue) {
		this.paramValue = paramValue;
	}

	@Column(name = "WORKFLOW_NODE_INSTANCE_ID", precision = 18, scale = 0)
	public Long getWorkflowNodeInstanceId() {
		return this.workflowNodeInstanceId;
	}

	public void setWorkflowNodeInstanceId(Long workflowNodeInstanceId) {
		this.workflowNodeInstanceId = workflowNodeInstanceId;
	}

	@Column(name = "WORK_HISTORY_ID", precision = 18, scale = 0)
	public Long getWorkHistoryId() {
		return this.workHistoryId;
	}

	public void setWorkHistoryId(Long workHistoryId) {
		this.workHistoryId = workHistoryId;
	}
	@Column(name = "VERSION", precision = 18, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}
	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}
	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}